<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />

<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jQselect.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
<script language="javascript">
function update()
{
        $("form#listForm").attr('action', '<?php echo $this->projectUrl(array('controller'=>'appstore', 'action'=>'updateall', 'backUrl'=>urlencode($this->pageUrl)));?>');
        $("#listForm").submit();

}
</script>
</head>

<body>
    <div id="main">
		<div id="topMenu">
		<div id="navigation">当前位置：<a href="<?php echo $this->projectUrl(array('action'=>'list'));?>">appstore基础信息列表</a> &gt; <span id="focus">排名列表</span></div>
		</div>
        <div id="body">
		            <div id="search">
                <form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl();?>">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
								开始时间：<input name="startTime" type="text" class="input" id="startTime" size="18" value="<?php echo $this->vars['startTime'];?>" /><script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});</script>
		-
		<input name="endTime" type="text" class="input" id="endTime" size="18" value="<?php echo $this->vars['endTime'];?>" />
		<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});</script>
                             <input type="submit" name="button" id="button" value="查找" class="button" />
                             </td>
                        </tr>
                    </table>
                </form>
            </div>
<form id="listForm" name="listForm" method="post" action="">
            <div id="content">
                    <table class="table">
                        <tr class="subject">
                            <td width="16%">appstore名称
                              <textarea style="display:none" name="arrId"><?php echo $this->arrId;?></textarea>
                          </td> 
							<td width="16%">appstoreId </td>
							<td width="15%">时间</td>
							<td width="14%">更新量</td>
							<td width="14%">下载量</td>
							<td width="19%">排名</td>
							<td width="6%">详情</td>
                        </tr>
<?php 
foreach ($this->rows as $row):
?>
                        <tr class="dataLine">   
							<td align="left"><?php echo isset($this->appstoreInfoArr[$row['appstoreId']]) ? $this->appstoreInfoArr[$row['appstoreId']] : $row['appstoreId'];?></td>
							<td align="left"><?php echo $row['appstoreId'];?></td>
                            <td align="left"><?php echo substr($row['addTime'],0,10);?></td>
							<td align="left"><input name="update<?php echo $row['id'];?>" type="text" value="<?php echo $row['updateAmount'];?>" size="10" /></td>
							<td align="left"><input name="download<?php echo $row['id'];?>" type="text" value="<?php echo $row['downloadAmount'];?>" size="10" /></td>
							<td align="left">最高<input name="maxRank<?php echo $row['id'];?>" readonly="readonly" type="text" value="<?php echo $row['maxRank'];?>" size="5" />
							最低<input name="minRank<?php echo $row['id'];?>" type="text" readonly="readonly" value="<?php echo $row['minRank'];?>" size="5" /></td>
							<td align="left"><a href="<?php echo $this->projectUrl(array('controller'=>'appstore', 'action'=>'viewall', 'id'=>$row['id'] , 'backUrl'=>urlencode($this->pageUrl)));?>">查看</a></td>
                        </tr>
<?php
endforeach;
?>
                    </table>
                    <table class="controlTable">
                        <tr>
                            <td align="left">
                                <input type="button" name="delete" id="delete" value="更新全部" class="button" onclick="return update();"/>
                            </td>
                             <td align="right" class="paginator" colspan="6">
                             	<?php echo $this->pageString;?>
                             </td>
                        </tr>
                    </table>
            </div>
			</form>
        </div>
</div>

</body>
</html>